package com.kai.prety;

import com.kai.prety.keymouse.TouchActivity;
import com.kai.prety.keymouse.KeyBoardActivity;
import com.kai.prety.keymouse.MouseActivity;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View.OnClickListener;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class KeyMouseActivity extends Activity{
	
	private Button keymouse_touch_button;
	private Button keymouse_keyboard_button;
	private Button keymouse_mouse_button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_key_mouse);
		
		keymouse_touch_button = (Button)findViewById(R.id.keymouse_touch);
		keymouse_keyboard_button = (Button)findViewById(R.id.keymouse_keyboard);
		keymouse_mouse_button = (Button)findViewById(R.id.keymouse_mouse);
		
		keymouse_touch_button.setOnClickListener(new buttonlistener());
		keymouse_keyboard_button.setOnClickListener(new buttonlistener());
		keymouse_mouse_button.setOnClickListener(new buttonlistener());
	}
	
	private class buttonlistener implements OnClickListener{

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			
			Intent intent = new Intent();
			
			switch (v.getId()) {
			case R.id.keymouse_touch:
				intent.setClass(getApplicationContext(), TouchActivity.class);
				break;
			case R.id.keymouse_keyboard:
				intent.setClass(getApplicationContext(), KeyBoardActivity.class);
				break;
			case R.id.keymouse_mouse:
				intent.setClass(getApplicationContext(), MouseActivity.class);
				break;
			default:
				break;
			}
			
			startActivity(intent);
			
		}
		
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.key_mouse, menu);
		return true;
	}

}
